<?php

/*
*###########################################################################################################################*
#															    															#
#															    															#
#    **  ** ****** ** **  **  ****** ** ***   ** ***   ****** ** **  **  ** **  ** ** **  **    ****   ** **  **  ******    #
#    **  ** ****** ********** ****** *******  *******  ****** ********** ** **  ** **********  ******  ********** ******    #
#    **  ** **  ** **  **  ** **     ***   ** **    ** **     **  **  **    **  ** **  **  ** ***   ** **  **  ** **        #
#    ****** **  ** **  **  ** ****** **   *** **   *** ****** **  **  ** ** **  ** **  **  ** **       **  **  ** ******    #
#    ****** **  ** **  **  ** ****** *******  *******  ****** **  **  ** ** **  ** **  **  ** **       **  **  ** ******    #
#    **  ** **  ** **  **  ** **     *****    ******   **     **  **  ** ** **  ** **  **  ** ***   ** **  **  **     **    #
#    **  ** ****** **  **  ** ****** **       **  ***  ****** **  **  ** ** ****** **  **  **  ******  **  **  ** ******    #
#    **  ** ****** **  **  ** ****** **       **   *** ****** **  **  ** **  ** ** **  **  **   ****   **  **  ** ******    #
#															    															#
#															    															#
#															    															#
#    2010 - 2011 © HomePremiumCMS made by HomePemium as PremiumEye & Security by HomePremium and Merijnz		    		#
#															    															#
#    Powered by PhoenixPHP 3.7.1 (build 138000)										    									#
#															    															#
#															    															#
#															    															#
*###########################################################################################################################*
*/

define('USERNAME_REQUIRED', FALSE);
define('ACCOUNT_REQUIRED', FALSE);
include('global.php');

if(isset($_SESSION["username"])){header("Location: me.php");}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
	<link rel="stylesheet" href="Public/Styles/Default/CSS/login_style.css" />
    
	<title><?php echo $sitename; ?></title>
    
</head>

<body>

	<?php if(isset($_GET["error"]) && $_GET["error"] == "password"){?>
    
		<div id="alert"> 
        
			<div id="alert_tekst">
            
				<?php echo $lang['incorrect_password']; ?>
                
			</div>
            
		</div>
        
	<?php }elseif(isset($_GET["error"]) && $_GET["error"] == "username"){?>
    
		<div id="alert"> 
        
			<div id="alert_tekst">
            
				<?php echo $lang['incorrect_username']; ?>
                
			</div>
            
		</div>
        
	<?php }elseif(isset($_GET["error"]) && $_GET["error"] == "email"){?>
    
		<div id="alert"> 
        
			<div id="alert_tekst">
            
				<?php echo $lang['error_email']; ?>
                
			</div>
            
		</div>
        
	<?php }elseif(isset($_GET["error"]) && $_GET["error"] == "ban"){
		
			if(isset($_GET["user"])){
				
				$userg = $core->EscapeString($_GET['user']);
				
				$query = mysql_query("SELECT * FROM bans WHERE value = '".$userg."' AND expire > UNIX_TIMESTAMP() ORDER BY expire DESC LIMIT 1");
				
			}elseif(isset($_GET["ip"])){
				
				$ipg = $core->EscapeString($_GET['ip']);
				
				$query = mysql_query("SELECT * FROM bans WHERE value = '".$ipg."' AND expire > UNIX_TIMESTAMP() ORDER BY expire DESC LIMIT 1");
				
			}
			
		$ban = @mysql_fetch_array($query);
	?>
    
		<div id="alert"> 
        
			<div id="alert_tekst">
            
				<?php echo $lang['banned']; ?>
                
			</div>
            
		</div>
        
	<?php }?>

<div id="container">

	<div style="padding-top: 10px;"></div>
    
	<div id="logo"></div>
    
	<div id="login_place">
    
		<form action="system/login.php" method="post">
        
			<div id="login_gebruikersnaam">
            
				<?php echo $lang['email']; ?><br />
            
				<input type="text" name="username" style="width: 100%"; placeholder="<?php echo $lang['email']; ?>" /><br />
            
			</div>
            
			<div id="login_wachtwoord">
            
				<?php echo $lang['password']; ?><br />
            
				<input type="password" name="password" style="width: 100%"; placeholder="<?php echo $lang['password']; ?>" /><br />
            
				<input type="checkbox" id="checkbox" style="margin-left: -220px;" /> <?php echo $lang['remember']; ?>
            
			</div>
            
			<div id="login_submit">
                
                <div id="login-form-submit">
				  <button style="border:0;background-color:transparent;margin-top:14px;"><a href="#" tabindex="5" id="login-submit-new-button" style="display: block; "><span><?php echo $lang['log_in']; ?></span></a></button>
                </div>
            
			</div>
            
		</form>
        
		<div style="float: right;">
    
			<?php
				$userq_tellup = mysql_query("SELECT * FROM users WHERE online = '1' ORDER BY id ASC");
				$user_tellup = mysql_num_rows($userq_tellup);
			?>
        
				<?php if($user_tellup < 1){ ?><?php echo $lang['users_online_none']; ?>
        
				<?php }elseif($user_tellup == 1){ ?><?php echo $lang['users_online_1']; ?>
        
				<?php }elseif($user_tellup > 1){ ?><?php echo $lang['users_online_more']; ?>
			<?php } ?>
        
		</div>
    
	</div>

	<div id="text_p">
    
		<div style="padding-top: 12px;">
        
			<?php echo $lang['welcome_on']; ?> <?php echo $lang['hotel_name']; ?>! <?php echo $lang['register_fast']; ?>
            
		</div>
        
	</div>
    
	<div id="container_middle"><br />
    
		<div id="users_online">
        
			<div style="color: #000000;font-size: 17px;margin-top:4px;">
            
            	<b></b>
                
                <center>
                
                	<b><?php echo $core->UsersOnline(); ?></b><br>
                    
                    <font style="font-size: 11.5px;"><?php echo $lang['users_online']; ?></font>
                    
                </center>
                
            </div>
            
		</div>
        
		<div style="color: white;font-weight: bold;font-size: 14px;";>
        
			<?php echo $lang['new_here']; ?>
            
        </div>
        
        <font style="float: left; color: #8F8F8F;">
        
			<?php echo $lang['push_button']; ?>
            
        </font>
        
		<br /><br /><br />
        
        <div id="join-now-button-container">
        
        <div style="margin-left: -2px;" id="join-now-button-wrapper">
        
        	<div class="join-now-button">
            
                <a class="join-now-link" id="register-link" href="register.php?make=user"> 
                
                    <span class="join-now-text-big"><?php echo $lang['join_now']; ?></span>
                    
                    <span class="join-now-text-small"><?php echo $lang['for_free']; ?></span>
                    
                </a>
                
                <span class="close"></span>
                
            </div>
        
        </div>
        </div>
        
	</div>
    
	<div id="footer">
    
		<div style="padding-top: 12px;">
        
        	<img align="right" src="Public/Styles/Default/Images/login_images/sulake_logo.png" />
        
			<?php include("system/footer.php"); ?>
            
		</div>
        
	</div> 
      
</div>

</body>
</html>

<?php include("system/mobile_detector.php"); ?>